let Mock = require("mockjs");
let data = Mock.mock({
  "swiper|10": ["@image(100x100,@color)"],
  "classify|10": [
    {
      id: "@id",
      title: "@ctitle(2,4)",
      "children|30": [
        {
          id: "@id",
          title: "@ctitle(2,4)",
          img: "@image(100x100,@color)",
        },
      ],
    },
  ],
});
module.exports = {
  devServer: {
    before(app) {
      app.get("/swiper", (req, res) => {
        res.send(data.swiper);
      });
      app.get("/classify", (req, res) => {
        res.send(data.classify);
      });
    },
  },
};
